<template>
    <div v-html="detailAPiData.goods_introduce"></div>


    <van-action-bar>
        <van-action-bar-icon icon="chat-o" text="客服" dot />
        <van-action-bar-icon icon="cart-o" text="购物车" badge="5" />
        <van-action-bar-icon icon="shop-o" text="店铺" badge="12" />
      <van-action-bar-button type="warning" text="加入购物车"  @click="dj"/>
  
        <van-action-bar-button type="danger" text="立即购买" />
    </van-action-bar>
</template>

<script setup>
import { ref } from 'vue';
import { useRouter, useRoute } from 'vue-router';
const detailAPiData = ref([])
const route = useRoute()
import { detailAPi } from '@/api/api'
const router = useRouter()
detailAPi(route.params.goods_id).then(res => {
    console.log('sd', res);
    detailAPiData.value = res.data.message
})


import { useCounterStore } from '@/stores/counter'
// 在组件内部的任何地方均可以访问变量 `store` ✨

const store = useCounterStore()
const dj = () => {
    router.push('/home/cart')
}
</script>

<style lang="scss" scoped></style>